flutter datetime.now only time

89

import 'package:intl/intl.dart';

DateTime now = DateTime.now();
String formattedTime = DateFormat.Hms().format(now);
print(formattedTime);
DateTime dateToday = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day) ; 

Comments

Submit
0 Comments